﻿@model tea.DB.강의

<div id="강의대화상자" class="modal hide" tabindex="-1" role="dialog">
    <div class="modal-header">
        <a class="close" data-dismiss="modal">&times;</a>
        <h1>강의</h1>
    </div>

    <form>
        @Html.HiddenFor(m => m.ID)
        <div class="modal-body">
            <div class="form-horizontal">
                <div class="inline">학기:</div>
                @foreach (var 학기 in BL강의.학기목록) {
                    @Html.RadioButtonFor(m => m.학기, 학기, new { data_lsj_validate = "required" })
                    @학기
                }
            </div>
            <div class="form-horizontal">
                <div class="inline">강의명:</div>
                @Html.TextBoxFor(m => m.강의명, new { data_lsj_validate = "required" })
            </div>
        </div>
    </form>
    <div class="modal-footer">
        <a class="btn" data-dismiss="modal">취소</a>
        <button class="btn btn-primary" onclick="강의저장()">저장</button>
    </div>
</div>

<script type="text/javascript">
    function 강의대화상자() {
        $("div#강의대화상자").modal("show");
        $("div#강의대화상자 input[type=text]").val("");
    }

    function 강의저장() {
        var form = $("div#강의대화상자 form");
        AjaxPostForm(form, "@Url.MyAction("Save", "Lecture")");
    }
</script>
